package com.tqjc.business.interactivewithscan.consts;

/**
 * 设备编码对应名称（数据库也需要一致）
 */
public enum DeviceEnum {
    /**
     * 100：指定废钢跨，200：指定炉渣跨，300：非指定跨的扫描仪，400：槽车
     * (100001：废钢跨1#天车（靠近火车），100002：废钢跨2#天车，200001：炉渣跨1#天车，200002：炉渣跨2#天车)
     * (100003：废钢跨货车云台扫描仪，200003：炉渣跨货车云台扫描仪，300001：天车扫描仪，300002：宽轨槽车扫描仪，300003：双轨槽车扫描仪)
     * (400001：双规1#槽车，400002：双轨2#槽车，400003：宽轨3#槽车)
     */
    Tianche_Steel_1("100001", "废钢跨1#天车"),
    Tianche_Steel_2("100002", "废钢跨2#天车"),
    Tianche_Slag_1("200001", "炉渣跨1#天车"),
    Tianche_Slag_2("200002", "炉渣跨2#天车"),
    Tianche_Steel_1_ESP("100010", "废钢跨1#天车_ESP安全"),
    Tianche_Steel_2_ESP("100020", "废钢跨2#天车_ESP安全"),
    Tianche_Slag_1_ESP("200010", "炉渣跨1#天车_ESP安全"),
    Tianche_Slag_2_ESP("200020", "炉渣跨2#天车_ESP安全"),
    Tianche_Steel_1_CC("100030", "废钢跨1#天车_槽车"),
    Tianche_Steel_2_CC("100040", "废钢跨2#天车_槽车"),
    Tianche_Slag_1_CC("200030", "炉渣跨1#天车_槽车"),
    Tianche_Slag_2_CC("200040", "炉渣跨2#天车_槽车"),
    Scanning_Steel("100003", "废钢跨货车云台扫描仪"),
    Scanning_Slag("200003", "炉渣跨货车云台扫描仪"),
    Scanning_Tianche("300001", "天车扫描仪"),
    Scanning_Wide_Track("300002", "宽轨槽车扫描仪"),
    Scanning_Double_Track("300003", "双轨槽车扫描仪"),
    Tanker_Double_Track_1("400001", "双轨1#槽车（中间槽车）"),
    Tanker_Double_Track_2("400002", "双轨2#槽车（靠近原点）"),
    Tanker_Wide_Track_3("400003", "宽轨3#槽车"),
    Tanker_Double_Track_1_Weight("400010", "双轨1#槽车（中间槽车）-读重"),
    Tanker_Double_Track_2_Weight("400020", "双轨2#槽车（靠近原点）-读重"),
    Tanker_Wide_Track_3_Weight("400030", "宽轨3#槽车-读重"),
    Truck_Steel("100004", "废钢跨货车云台"),
    Truck_Slag("200004", "炉渣跨货车云台"),
    Tianche_Steel_Safety("500001", "废钢跨天车安全监测设备"),
    Tianche_Slag_Safety("500002", "炉渣跨天车安全监测设备"),
    Kuqu_Dianwei_Steel("100004", "废钢跨库区点位服务"),
    Kuqu_Dianwei_Slag("200004", "炉渣跨库区点位服务"),
    Kuqu_Dianwei_Slag_One("200005", "炉渣跨一号车库区点位服务"),
    Kuqu_Dianwei_Slag_Two("200006", "炉渣跨二号车库区点位服务"),
    ;
    private String deviceCode;
    private String deviceName;

    public String getDeviceCode() {
        return deviceCode;
    }

    public String getDeviceName() {
        return deviceName;
    }

    DeviceEnum(String deviceCode, String deviceName) {
        this.deviceCode = deviceCode;
        this.deviceName = deviceName;
    }

    public static DeviceEnum getDeviceInfoByCode(String deviceCode) {
        for (DeviceEnum value : DeviceEnum.values()) {
            if (deviceCode.equals(value.getDeviceCode())) {
                return value;
            }
        }
        return null;
    }
}
